.PHONY: lint error

# 定义环境变量
export GOBIN  := $(CURDIR)/bin

# 代码风格检查
lint:
	@go mod tidy 
	@echo ">>> golangci-lint check code....."
	@golangci-lint run

# 单元测试
test:
	@echo ">>> starting unit tests....."
	gotest -v ./... || go test -v ./...

# 清除所有编译生成的文件
clean:
	@echo ">>> clean up......"
ifeq ($(OS),Windows_NT)
	@ del bin/*
else
	@rm -rf bin/*
endif
